
<?php $this->load->view('header'); ?>

<body id="login_body">

<table id="login_form_container" width="300px" align="right">

    <tr>
        <td width="70%">
            
        </td>
        <td width="30%">
            <?php if (isset($error) && !empty($error)) : ?>
                <?php echo '<p id="errmsg" class="error">' . $error . '</p>'; ?>
            <?php endif; ?>

            <?php echo form_open('main/login'); ?>
            User Name
            <input type="text" name="uname" id="uname" size="20" value="<?php echo $this->session->userdata('uname');?>" autofocus="true" accesskey="U" />
            Password
            <input type="password" name="ucode" id="ucode" size="20" accesskey="P"/>
            <input type="hidden" name="ulink" id="ulink" />
            <br>
            <input type="submit" name="submit" id="submit" value="Login" />
            
            <input type="reset" name="reset" id="reset" value="Clear" />

            <?php echo form_close(); ?>
            
        </td>
    </tr>

</table>

<script language="javascript">

//if(document.getElementById("uname").value == "")
    document.getElementById("uname").focus();

/*        && document.getElementById("ucode").value != "")
        {
            document.forms[0].submit();
        }
    
  */  
</script>
<?php $this->load->view('footer'); ?>